From 1ebdddf4a2f3a14dd4956944a3868a9ed82b5135 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 29 Nov 2005 09:55:50 +0000 Subject: [PATCH] * Removed Parser::doExponent(), unused * substr( '======', 0, $i ) => str_repeat( '=', $i ), clearer and slightly faster --- includes/Parser.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index f40d3ea0ce..8747b09bfe 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -831,19 +831,6 @@ class Parser return $text; } - /** - * Parse ^^ tokens and return html - * - * @access private - */ - function doExponent( $text ) { - $fname = 'Parser::doExponent'; - wfProfileIn( $fname ); - $text = preg_replace('/\^\^(.*?)\^\^/','\\1', $text); - wfProfileOut( $fname ); - return $text; - } - /** * Parse headers and return html * @@ -853,7 +840,7 @@ class Parser $fname = 'Parser::doHeadings'; wfProfileIn( $fname ); for ( $i = 6; $i >= 1; --$i ) { - $h = substr( '======', 0, $i ); + $h = str_repeat( '=', $i ); $text = preg_replace( "/^{$h}(.+){$h}(\\s|$)/m", "\\1\\2", $text ); } -- 2.20.1